package com.gxa.modules.entity;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.GeneratedValue;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.math.BigDecimal;
/** 
 * @team mackie Studio 
 * @Author kk 
 * @Date 2023-03-17 20:15:22 
 */
@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("crm_renewal_record" )
public class CrmRenewalRecord  implements Serializable {

	private static final long serialVersionUID =  1365309790407713646L;

	/**
	 * 续费编号
	 */
	@Id
	@TableId(value = "id", type = IdType.AUTO)
	private Integer id;

	/**
	 * 合同编号
	 */
   	@TableField("contract_id" )
	private String contractId;

	/**
	 * 新到期日期
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern="yyyy-MM-dd hh:mm:ss",timezone="GMT+8")
   	@TableField("new_expiration_date" )
	private Date newExpirationDate;

	/**
	 * 总金额
	 */
   	@TableField("money" )
	private BigDecimal money;

	/**
	 * 已收款
	 */
   	@TableField("payment" )
	private BigDecimal payment;

	/**
	 * 备注
	 */
   	@TableField("remark" )
	private String remark;

	/**
	 * 业务人员
	 */
   	@TableField("business_id" )
	private Integer businessId;

	/**
	 * 续费状态
	 */
   	@TableField("status" )
	private String status;

	/**
	 * 录入时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern="yyyy-MM-dd hh:mm:ss",timezone="GMT+8")
   	@TableField("enter_date" )
	private Date enterDate;

	/**
	 * 删除状态（1存在 0删除）
	 */
	@TableLogic
   	@TableField("deleted_state" )
	private Integer deletedState;

	/**
	 * 续费标题
	 */
	private String name;

	public CrmRenewalRecord(String contractId, Date newExpirationDate, BigDecimal money, BigDecimal payment, String remark, Integer businessId, String status, Date enterDate, Integer deletedState,String name) {
		this.contractId = contractId;
		this.newExpirationDate = newExpirationDate;
		this.money = money;
		this.payment = payment;
		this.remark = remark;
		this.businessId = businessId;
		this.status = status;
		this.enterDate = enterDate;
		this.deletedState = deletedState;
		this.name = name;
	}
}
